#include "Sort.h"
#include "Stack.h"

void TestInsertSort()
{
	int a[] = { 1,3,5,7,9,2,8,6,4,0 };
	int n = sizeof(a) / sizeof(a[0]);

	InsertSort(a, n);
	PrintArray(a, n);
}

void TestShellSort()
{
	int a[] = { 1,3,5,7,9,2,8,6,4,0 };
	int n = sizeof(a) / sizeof(a[0]);

	ShellSort(a, n);
	PrintArray(a, n);
}

void TestSelectSort()
{
	//int a[] = { 1,3,5,7,9,2,8,6,4,0 };
	int a[] = { 9,1,2,5,7,4,8,6,3,5,1,8,3 };
	int n = sizeof(a) / sizeof(a[0]);

	SelectSort(a, n);
	PrintArray(a, n);
}

void TestHeapSort()
{
	int a[] = { 1,3,5,7,9,2,8,6,4,0 };
	int n = sizeof(a) / sizeof(a[0]);

	HeapSort(a, n);
	PrintArray(a, n);
}

void TestBubbleSort()
{
	int a[] = { 1,3,5,7,9,2,8,6,4,0 };
	int n = sizeof(a) / sizeof(a[0]);

	BubbleSort(a, n);
	PrintArray(a, n);
}

void TestQuickSort()
{
	int a[] = { 1,3,5,7,9,2,8,5,4,0 };
	int n = sizeof(a) / sizeof(a[0]);

	QuickSort(a, 0, n - 1);
	PrintArray(a, n);
}

void TestMergeSort()
{
	int a[] = { 1,3,5,7,9,2,8,5,4,0, 11 };
	int n = sizeof(a) / sizeof(a[0]);

	MergeSort(a,n);
	PrintArray(a, n);
}

void TestMergeSortNoR()
{
	int a[] = { 1,3,5,7,9,2,8,5,4,0,11,3 };
	int n = sizeof(a) / sizeof(a[0]);

	MergeSortNoR(a, n);
	PrintArray(a, n);
}

void TestCountSort()
{
	int a[] = { 1,3,5,7,9,2,8,5,4,0,11,3 };
	int n = sizeof(a) / sizeof(a[0]);

	CountSort(a, n);
	PrintArray(a, n);
}

int main()
{
	TestMergeSortNoR();
	return 0;
}